package com.triones.biz.infra.entity.file.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * 文件配置业务对象 tr_infra_file_config
 *
 * @author triones
 * 2023-09-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FileConfigBO extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @NotNull(message = "编号不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 配置名
     */
    @NotBlank(message = "配置名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 备注
     */
    private String remark;

    /**
     * 存储器
     */
    @NotNull(message = "存储器不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer storage;

    /**
     * 存储配置
     */
    @NotNull(message = "存储配置不能为空", groups = { AddGroup.class, EditGroup.class })
    private Map<String, Object> config;

    /**
     * 是否为主配置
     */
    private Integer master;
}
